Optimal. Leaf size=126 \[ -\frac {(b g-a h) (d g-c h) (f g-e h) \log (g+h x)}{h^4}+\frac {x (b (d g-c h) (f g-e h)-a h (-c f h-d e h+d f g))}{h^3}+\frac {x^2 (a d f h-b (-c f h-d e h+d f g))}{2 h^2}+\frac {b d f x^3}{3 h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {142} \[ \frac {x^2 (a d f h-b (-c f h-d e h+d f g))}{2 h^2}+\frac {x (b (d g-c h) (f g-e h)-a h (-c f h-d e h+d f g))}{h^3}-\frac {(b g-a h) (d g-c h) (f g-e h) \log (g+h x)}{h^4}+\frac {b d f x^3}{3 h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 142
Rubi steps
\begin {align*} \int \frac {(a+b x) (c+d x) (e+f x)}{g+h x} \, dx &=\int \left (\frac {b (d g-c h) (f g-e h)-a h (d f g-d e h-c f h)}{h^3}+\frac {(a d f h-b (d f g-d e h-c f h)) x}{h^2}+\frac {b d f x^2}{h}+\frac {(-b g+a h) (-d g+c h) (-f g+e h)}{h^3 (g+h x)}\right ) \, dx\\ &=\frac {(b (d g-c h) (f g-e h)-a h (d f g-d e h-c f h)) x}{h^3}+\frac {(a d f h-b (d f g-d e h-c f h)) x^2}{2 h^2}+\frac {b d f x^3}{3 h}-\frac {(b g-a h) (d g-c h) (f g-e h) \log (g+h x)}{h^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 123, normalized size = 0.98 \[ \frac {h x \left (3 a h (2 c f h+d (2 e h-2 f g+f h x))+b \left (3 c h (2 e h-2 f g+f h x)+3 d e h (h x-2 g)+d f \left (6 g^2-3 g h x+2 h^2 x^2\right )\right )\right )-6 (b g-a h) (d g-c h) (f g-e h) \log (g+h x)}{6 h^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.94, size = 163, normalized size = 1.29 \[ \frac {2 \, b d f h^{3} x^{3} - 3 \, {\left (b d f g h^{2} - {\left (b d e + {\left (b c + a d\right )} f\right )} h^{3}\right )} x^{2} + 6 \, {\left (b d f g^{2} h - {\left (b d e + {\left (b c + a d\right )} f\right )} g h^{2} + {\left (a c f + {\left (b c + a d\right )} e\right )} h^{3}\right )} x - 6 \, {\left (b d f g^{3} - a c e h^{3} - {\left (b d e + {\left (b c + a d\right )} f\right )} g^{2} h + {\left (a c f + {\left (b c + a d\right )} e\right )} g h^{2}\right )} \log \left (h x + g\right )}{6 \, h^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.19, size = 208, normalized size = 1.65 \[ \frac {2 \, b d f h^{2} x^{3} - 3 \, b d f g h x^{2} + 3 \, b c f h^{2} x^{2} + 3 \, a d f h^{2} x^{2} + 3 \, b d h^{2} x^{2} e + 6 \, b d f g^{2} x - 6 \, b c f g h x - 6 \, a d f g h x + 6 \, a c f h^{2} x - 6 \, b d g h x e + 6 \, b c h^{2} x e + 6 \, a d h^{2} x e}{6 \, h^{3}} - \frac {{\left (b d f g^{3} - b c f g^{2} h - a d f g^{2} h + a c f g h^{2} - b d g^{2} h e + b c g h^{2} e + a d g h^{2} e - a c h^{3} e\right )} \log \left ({\left | h x + g \right |}\right )}{h^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.00, size = 246, normalized size = 1.95 \[ \frac {b d f \,x^{3}}{3 h}+\frac {a d f \,x^{2}}{2 h}+\frac {b c f \,x^{2}}{2 h}+\frac {b d e \,x^{2}}{2 h}-\frac {b d f g \,x^{2}}{2 h^{2}}+\frac {a c e \ln \left (h x +g \right )}{h}-\frac {a c f g \ln \left (h x +g \right )}{h^{2}}+\frac {a c f x}{h}-\frac {a d e g \ln \left (h x +g \right )}{h^{2}}+\frac {a d e x}{h}+\frac {a d f \,g^{2} \ln \left (h x +g \right )}{h^{3}}-\frac {a d f g x}{h^{2}}-\frac {b c e g \ln \left (h x +g \right )}{h^{2}}+\frac {b c e x}{h}+\frac {b c f \,g^{2} \ln \left (h x +g \right )}{h^{3}}-\frac {b c f g x}{h^{2}}+\frac {b d e \,g^{2} \ln \left (h x +g \right )}{h^{3}}-\frac {b d e g x}{h^{2}}-\frac {b d f \,g^{3} \ln \left (h x +g \right )}{h^{4}}+\frac {b d f \,g^{2} x}{h^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 162, normalized size = 1.29 \[ \frac {2 \, b d f h^{2} x^{3} - 3 \, {\left (b d f g h - {\left (b d e + {\left (b c + a d\right )} f\right )} h^{2}\right )} x^{2} + 6 \, {\left (b d f g^{2} - {\left (b d e + {\left (b c + a d\right )} f\right )} g h + {\left (a c f + {\left (b c + a d\right )} e\right )} h^{2}\right )} x}{6 \, h^{3}} - \frac {{\left (b d f g^{3} - a c e h^{3} - {\left (b d e + {\left (b c + a d\right )} f\right )} g^{2} h + {\left (a c f + {\left (b c + a d\right )} e\right )} g h^{2}\right )} \log \left (h x + g\right )}{h^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.54, size = 174, normalized size = 1.38 \[ x\,\left (\frac {a\,c\,f+a\,d\,e+b\,c\,e}{h}-\frac {g\,\left (\frac {a\,d\,f+b\,c\,f+b\,d\,e}{h}-\frac {b\,d\,f\,g}{h^2}\right )}{h}\right )+x^2\,\left (\frac {a\,d\,f+b\,c\,f+b\,d\,e}{2\,h}-\frac {b\,d\,f\,g}{2\,h^2}\right )+\frac {\ln \left (g+h\,x\right )\,\left (a\,c\,e\,h^3-b\,d\,f\,g^3-a\,c\,f\,g\,h^2-a\,d\,e\,g\,h^2-b\,c\,e\,g\,h^2+a\,d\,f\,g^2\,h+b\,c\,f\,g^2\,h+b\,d\,e\,g^2\,h\right )}{h^4}+\frac {b\,d\,f\,x^3}{3\,h} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.58, size = 146, normalized size = 1.16 \[ \frac {b d f x^{3}}{3 h} + x^{2} \left (\frac {a d f}{2 h} + \frac {b c f}{2 h} + \frac {b d e}{2 h} - \frac {b d f g}{2 h^{2}}\right ) + x \left (\frac {a c f}{h} + \frac {a d e}{h} - \frac {a d f g}{h^{2}} + \frac {b c e}{h} - \frac {b c f g}{h^{2}} - \frac {b d e g}{h^{2}} + \frac {b d f g^{2}}{h^{3}}\right ) + \frac {\left (a h - b g\right ) \left (c h - d g\right ) \left (e h - f g\right ) \log {\left (g + h x \right )}}{h^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________